package days48;

import java.util.ArrayList;
import java.util.Scanner;

public class day35 {
    public static void main1(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()) {
            int n=scanner.nextInt();
            long a=1;
            long b=1;
            long c=1;
            for (int i = 2; i <= n; i++) {
                c=a+b;
                a=b;
                b=c;
            }
            System.out.println(c);
        }
    }

    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()) {
            int n=scanner.nextInt();
            scanner.nextLine();
            ArrayList<String> arrayList=new ArrayList<String>();
            for (int i = 0; i < n; i++) {
                String s=scanner.nextLine();
                if(s.contains(" ")||s.contains(",")){
                    System.out.print("\""+s+"\"");
                }else {
                    System.out.print(s);
                }
                if(i!=n-1){
                    System.out.print(",");
                }
            }
        }

    }
}


